﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>webapps-in-action.com</title>
    <style>
        body
        {
            font-family: Arial;
            font-size:13px;
        }
        h1
        {
            font-size: 16px;
        }
    </style>
</head>
<body>
    <div>
        <table>
            <tr>
                <td valign="top" colspan="2">
                    <h1>Report of MDB Microsoft Access to RTF/PDF in ASP.NET MVC4</h1>

                </td>
            </tr>
            <tr>
                <td width="360px" valign="top">Here you see a IFrame with<br />
                    URL to HomeController => "/Home/GetPDF"<br />
                    <br />
                    The Controller returns a FileResult with MIME Type
                    "application/pdf" of a just created PDF File from
                    a Report of a Microsoft Access Database (.mdb in this Example the MS NordWind Demo Database)                    
                    using Microsoft.Office.Interop.Access and Microsoft.Office.Interop.Word<br />
                    <br />
                    So unfortunally this is a Solution where 
                    MS Access and MS Word have to be installed on WebServer and the IIS Worker Process needs execute rights ;-(<br />
                    <br />
                    I did this coding because of old MSAccess/VBA Project where a lot of Reports are working
                    pretty well. So why not keep them?<br />
                    <br />
                    If you do new stuff. I suggest <a href="http://www.telerik.com">Telerik Reporting!</a>
                </td>
                <td>
                    <iframe src="/Home/GetPDF" width="400" height="600"></iframe>
                </td>
            </tr>
        </table>

    </div>
</body>
</html>
